package org.example.platform.design.decoration.version;

public class Dec extends Person2 {
    Person2 person2;

    public void Dec(Person2 person) {
//        System.out.println(person);
        System.out.println("2");
        this.person2 = person;
    }

    @Override
    public void show() {
        if (null != person2) {
            System.out.println("4");
            this.person2.show();
            System.out.println("6");
        }
    }
}
